<!DOCTYPE html>
<html lang="en">
<head>
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
        <meta name="format-detection"content="telephone=no, email=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black" /><!-- 设置苹果工具栏颜色 -->
        <meta name="renderer" content="ie-comp">
        <meta name="renderer" content="ie-stand">
        <meta name="renderer" content="webkit">  
        <meta name="keywords" content="耀盛中国,耀盛智投,理财产品,智选财富,耀盛智投官网"/>
        <meta name="description" content="耀盛智投为耀盛中国旗下理财产品智选平台。专注于为大众富裕阶层、精英个人、中产阶级家庭、合规机构等提供定制化资产配置咨询推荐服务，帮助客户实现财富的增值。" />
        <title>我的</title>
        <script src="../lib/js/ftSize.js"></script>
        <link rel="stylesheet" href="../lib/css/_base.css">
        <link rel="stylesheet" type="text/css" href="../lib/css/m_index.css">
</head>
<body>
<!--  我的 -->
<div class="product-main ">
    <div class="M_top" id="mineMobile"></div>
    <div class="M_property">
        <h3 id="totalAmount"></h3>
        <p>我的资产(元)</p>
    </div>
    <ul class="M_money">
        <li>
            <p id="principleing"></p>
            <span>在投本金(元)</span>
        </li>
        <li>
            <p id="waitIncome"></p>
            <span>待收收益(元)</span>
        </li>
        <li>
            <p id="totalAccumulateIncome"></p>
            <span>累计收益(元)</span>
        </li>
    </ul>
    <div class="M_recharge">
        <ul>
            <li>
                <h2 id="availableAmount"></h2>
                <p>可用余额(元)</p>
            </li>
            <li>
                <a href="recharge.html">
                    <span class="M_btn1">充值</span>
                </a>
                <a href="withdrawal.html">
                    <span class="M_btn2" id="winthdrawalO">提现</span>
                </a>
                <a href="../login/attestation/index.html">
                    <span class="M_btn2" style="display: none;" id="winthdrawalT">提现</span>
                </a>
            </li>
        </ul>
    </div>
    <ul class="M_list">
        <a href="netLending/index.html"><li><span>我的理财</span><i></i></li></a>
        <a href="myInsurance/index.html"><li><span>我的保险</span><i></i></li></a>
        
        <a href="transactRecord/index.html"><li><span>交易记录</span><i></i></li></a>
        <a href="personalSet/index.html"><li><span>个人设置</span><i></i></li></a>
    </ul>
</div>
<div id="footer">
        <div class="footerActive" id="foot-body"> <a href="../home/index.html"> <i id="startPage"></i><small>首页</small></a><a href="../productList/index.html"><i id="centerPage"></i><small>产品列表</small></a><a href="../mine/index.html" class="iconActive"><i id="endPage"></i><small>我的</small></a></div>
</div>  
<script src="../lib/js/jquery.min.js"></script> 
<script src="../lib/js/public-header.js"></script> 
<script>
 
 $(document).ready(function(){
    let wpuserToken=window.sessionStorage.getItem('wpuserToken');
    let wpuserInfo = window.sessionStorage.getItem("wpuserInfo");//是否有登录信息
    let wpcertFlag=window.sessionStorage.getItem('wpcertFlag');//实名认证1实名2未实名
    let wpriskFlag =window.sessionStorage.getItem('wpriskFlag');//是否测评 1评测，2:未评测
     if(wpuserInfo!=null){
        let userPhone=JSON.parse(wpuserInfo).userPhone.substring(0,3)+"****"+JSON.parse(wpuserInfo).userPhone.substring(9,11); 
        $('#mineMobile').text(userPhone)
    }else{
        window.location.href="../login/login.html";
    }
     //提现
    
    
    if(wpcertFlag=='1'){
        $('#winthdrawalO').show();
        $('#winthdrawalT').hide()
    }else if(wpcertFlag=='2'){
        $('#winthdrawalT').show();
        $('#winthdrawalO').hide();
    }
    
   
amountShowdata()
    /* 我的账户信息 */
function amountJson() {
    var json = {
        "faceCode":"my/getUserAsset",
        "token":wpuserToken,    
        "clientInfo":"W,100,IE8",  
        "requestTime": formatDateTime(startTime),
        "body":{}
     }
    return json;
}

/* 判断是否注册 */
    function amountShowdata(){
        $.ajax({  
            type: "POST",
            url: httpServer+"my/getUserAsset",
            headers:{
                'Access-Control-Allow-Origin':'*'
            }, 
            async:false,
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify(amountJson()),
            dataType: "json",
            success: function (amountShow) {  
                if(amountShow.resCode!='0' ){
                    oneError(amountShow)
                }else{
                    let resVo=amountShow.body.resVo;
                    $('#totalAmount').text(resVo.totalAmount);
                    $('#principleing').text(resVo.principleing);
                    $('#waitIncome').text(resVo.waitIncome);
                    $('#totalAccumulateIncome').text(resVo.totalAccumulateIncome);
                    $('#availableAmount').text(resVo.availableAmount);
                }
            },
            error: function(error){  
                console.log(error,1);  
            }    
        }); 
}


})




</script>
</body>
</html>